package ;

import org.flixel.FlxTilemap;

/**
 * ...
 * @author ...
 */
class LvlLoader extends FlxTilemap
{

	public function new() 
	{
		
		var tmx : TmxMap = new TmxMap( nme.Assets.getText('level/back.tmx') );

		// Basic level structure
		var t:FlxTilemap = new FlxTilemap();

		// Generate a CSV from the layer 'map' with all the tiles from the TileSet 'tiles'
		var mapCsv:String = tmx.getLayer('map').toCsv( tmx.getTileSet('tiles') );

		t.loadMap(mapCsv, "gfx/tiles.png", 8, 8, FlxTilemap.OFF);
		t.follow();
		add(t);
		
	}
	
}